Hermes Agent迁移执行检查清单
Hermes Agent 迁移执行检查清单
📋 执行前准备
环境检查
- Python 3.10+ 已安装(当前:3.12.3 ✅)
- Git 已安装(当前:2.43.0 ✅)
- curl 已安装(当前:已安装 ✅)
- 至少2GB可用磁盘空间
API密钥准备
- 小米MIMO API Key
- 腾讯Coding API Key
- Google Gemini API Key
- 飞书应用凭证(建议创建新的测试应用)
数据备份
- 创建OpenClaw完整备份
backup_dir="/root/openclaw-backup-$(date +%Y%m%d-%H%M%S)" mkdir -p $backup_dir cp -r ~/.openclaw $backup_dir/ - 备份密钥文件
cp ~/.openclaw/secrets.env $backup_dir/ - 记录备份位置:
_________________
🚀 阶段1: 安装Hermes(不影响OpenClaw)
步骤1.1: 执行安装
- 运行一键安装脚本
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash - 安装完成时间:
_________________
步骤1.2: 验证安装
- 重新加载shell配置
source ~/.bashrc - 检查版本
记录版本号:hermes version_________________ - 运行诊断
诊断结果:[ ] 通过 / [ ] 失败hermes doctor
步骤1.3: 测试基础功能
- 测试对话
回复内容:hermes chat -q "你好"_________________
🔧 阶段2: 配置迁移
步骤2.1: 执行自动迁移
-
预览迁移内容
hermes claw migrate --source ~/.openclaw --dry-run预览内容:
_________________ -
执行迁移
hermes claw migrate --source ~/.openclaw --migrate-secrets -y迁移结果:[ ] 成功 / [ ] 失败
步骤2.2: 手动配置(如果自动迁移失败)
-
创建配置目录
mkdir -p ~/.hermes/{memories,skills,cron,sessions,logs,context} -
配置模型API密钥
nano ~/.hermes/.env已配置的模型:
- 小米MIMO
- 腾讯Coding
- Google Gemini
-
配置飞书
# 选择要迁移的飞书账户(建议:ny-宁姚) 选择的账户:`_________________`已添加飞书配置:
- FEISHU_APP_ID
- FEISHU_APP_SECRET
步骤2.3: 验证配置
-
检查配置文件
hermes config check检查结果:[ ] 通过 / [ ] 失败
-
列出记忆
hermes memory list记忆数量:
_________________ -
列出skills
hermes skills listSkills数量:
_________________
🔌 阶段3: 飞书连接测试
步骤3.1: 安装依赖
- 安装飞书依赖
pip install lark-oapi websockets aiohttp -q
步骤3.2: 启动Gateway
-
启动Hermes Gateway(使用不同端口)
hermes gateway run --port 5001 &进程PID:
_________________ -
查看Gateway状态
hermes gateway status状态:
_________________
步骤3.3: 检查飞书连接
-
查看日志确认连接
tail -20 ~/.hermes/logs/gateway.log连接状态:[ ] 已连接 / [ ] 未连接
-
在飞书测试群发送消息测试 测试时间:
_________________回复内容:_________________
⚖️ 阶段4: 并行运行测试
步骤4.1: 确认双服务运行
-
OpenClaw状态
openclaw gateway status状态:
_________________ -
Hermes状态
hermes gateway status状态:
_________________
步骤4.2: 功能对比测试
| 测试项 | OpenClaw | Hermes | 通过 |
|---|---|---|---|
| 基础对话 | [ ] | [ ] | [ ] |
| 记忆查询 | [ ] | [ ] | [ ] |
| 技能调用 | [ ] | [ ] | [ ] |
| 飞书连接 | [ ] | [ ] | [ ] |
| 响应速度 | ___秒 | ___秒 | [ ] |
步骤4.3: 稳定性测试
-
连续运行24小时 开始时间:
_________________结束时间:_________________ -
检查内存占用
ps aux | grep hermes内存占用:
_________________ -
检查错误日志
grep -i error ~/.hermes/logs/gateway.log错误数量:
_________________
🎯 阶段5: 决策点
测试结果评估
继续迁移条件(全部满足):
- Hermes基础功能正常
- 飞书连接稳定
- 响应质量可接受
- 内存占用合理(<500MB)
- 无严重错误
决策:
- ✅ 继续迁移,配置开机自启
- ❌ 暂停迁移,继续使用OpenClaw
- ⏸️ 延长测试期(建议再测试___天)
🚀 阶段6: 正式部署(如果决定迁移)
步骤6.1: 配置开机自启
-
创建systemd服务
sudo tee /etc/systemd/system/hermes-gateway.service > /dev/null << 'EOF' [Unit] Description=Hermes Gateway Service After=network.target [Service] Type=simple User=root WorkingDirectory=/root/.hermes ExecStart=/usr/local/bin/hermes gateway run Restart=always RestartSec=10 TimeoutStartSec=180 TimeoutStopSec=120 [Install] WantedBy=multi-user.target EOF -
启用并启动服务
sudo systemctl daemon-reload sudo systemctl enable hermes-gateway.service sudo systemctl start hermes-gateway.service -
验证服务状态
systemctl status hermes-gateway.service状态:
_________________
步骤6.2: 配置自动恢复
- 添加cron任务
crontab -e # 添加: */5 * * * * systemctl is-active hermes-gateway >/dev/null || systemctl start hermes-gateway 0 3 * * * systemctl restart hermes-gateway
步骤6.3: 停止OpenClaw(可选)
警告: 确认Hermes完全稳定后再执行!
-
停止OpenClaw Gateway
openclaw gateway stop -
禁用OpenClaw开机自启(如果配置了)
systemctl disable openclaw-gateway # 根据实际服务名调整
🔄 回滚方案(如果Hermes不合适)
立即回滚步骤
-
停止Hermes
pkill -f "hermes gateway" # 或 hermes gateway stop -
确认OpenClaw运行
openclaw gateway status -
如OpenClaw未运行,启动它
openclaw gateway start -
在飞书验证OpenClaw恢复正常 验证时间:
_________________验证结果:[ ] 正常 / [ ] 异常
完全卸载Hermes
-
停止所有Hermes进程
pkill -f hermes -
删除Hermes目录
rm -rf ~/.hermes -
删除systemd服务
sudo systemctl disable hermes-gateway.service sudo rm /etc/systemd/system/hermes-gateway.service sudo systemctl daemon-reload -
恢复OpenClaw备份(如果需要)
# 从备份目录恢复 cp -r /root/openclaw-backup-XXX/.openclaw ~/.openclaw
📊 监控指标记录
每日检查(建议持续1周)
| 日期 | 内存占用 | CPU使用 | 错误数 | 响应延迟 | 备注 |
|---|---|---|---|---|---|
| ___ | ___MB | ___% | ___ | ___秒 | ___ |
| ___ | ___MB | ___% | ___ | ___秒 | ___ |
| ___ | ___MB | ___% | ___ | ___秒 | ___ |
| ___ | ___MB | ___% | ___ | ___秒 | ___ |
| ___ | ___MB | ___% | ___ | ___秒 | ___ |
| ___ | ___MB | ___% | ___ | ___秒 | ___ |
| ___ | ___MB | ___% | ___ | ___秒 | ___ |
检查命令
# 内存占用
ps aux | grep hermes | awk '{print $6/1024 " MB"}'
# CPU使用
top -bn1 | grep hermes
# 错误统计
grep -c "error" ~/.hermes/logs/gateway.log
# 响应测试
time hermes chat -q "测试"
✅ 最终确认
迁移完成标准
- Hermes运行稳定超过1周
- 无严重错误
- 功能满足需求
- 性能可接受
- 开机自启已配置
- 自动恢复已配置
文档归档
- 记录最终配置
- 记录遇到的问题和解决方案
- 更新运维文档
检查清单版本: 1.0
创建时间: 2026-04-11
执行人: _________________
开始时间: _________________
完成时间: _________________
归档时间: 2026-04-14
来源: /root/.openclaw/workspace-ns/hermes-migration-checklist.md